<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
	<style>
		.warning{
			color: #f24;
		}
		.safe{
			color: #42b983;
		}
	</style>
</head>
<body>
<script src='http://cdn.jsdelivr.net/vue/1.0.26/vue.js'></script>
<script src='https://cdn.jsdelivr.net/vue.router/0.7.10/vue-router.min.js'></script>
<div id="root">
	<div v-bind:class="classArray" @click="removeClass()">去掉class</div>
</div>
<script>
	var vm = new Vue({
		el : '#root',
		data : {
			classArray : ['warning','safe'],
		},
		methods : {
			removeClass : function(){
				this.classArray.pop();
			},
			addClass : function(cName){
				this.classArray.push(cName);
			}
		}
	});
</script>	
</body>
</html>